package com.xiaolee.app1.security;

import org.springframework.stereotype.Component;

import javax.servlet.*;
import java.io.IOException;

/**
 * 登陆认证过滤器
 *
 * @author lizhongcheng@didiglobal.com
 * @version 1.0
 * @date 2021-06-04 15:22:08
 * @description
 */
@Component("loginFilter")
public class LoginFilter implements Filter {

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        // do nothing
    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        System.out.println("过滤前...");
        chain.doFilter(request, response);
        System.out.println("过滤后...");
    }

    @Override
    public void destroy() {

    }
}
